<script>
import outMain from "@/components/outMain.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { TrainingDetail } from "@/http/api";
export default {
  components: { outMain },
  name: "",
  data() {
    return {
      detailId: this.$route.query.id,
      formData: {},
    };
  },
  props: {},
  setup() {},
  methods: {
    getData() {
      TrainingDetail({ training_content_id: this.detailId }).then((res) => {
        if (res.data.code == 1) {
          this.formData = res.data.data;
        }
      });
    },
    backFn() {
      this.$router.back();
    },
  },
  mounted() {},
  created() {
    this.getData();
  },
};
</script>
<template>
  <outMain>
    <div class="formCont">
      <div class="formStep">
        <div class="formHead">
          <div>培训详情</div>
          <btn value="返回上一级" @ok="backFn"></btn>
        </div>
        <div class="formMain">
          <div class="stepCont">
            <div class="formDes">
              <div class="desTitle">基本信息</div>
              <div class="desCont">
                <div class="desItem">
                  <div class="desName">培训名称</div>
                  <div class="desText">{{ formData.training_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">培训类别</div>
                  <div class="desText">{{ formData.training_type }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">培训状态</div>
                  <div class="desText">
                    <el-tag v-if="formData.training_content_status == 1"
                      >报名中</el-tag
                    >
                    <el-tag
                      type="info"
                      v-if="formData.training_content_status == 2"
                      >已关闭</el-tag
                    >
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">培训定金</div>
                  <div class="desText">{{ formData.bm_money }}元</div>
                </div>
                <div class="desItem">
                  <div class="desName">培训总价</div>
                  <div class="desText">{{ formData.total_money }}元</div>
                </div>
                <div class="desItem">
                  <div class="desName">报名人数</div>
                  <div class="desText">
                    {{ formData.training_sign_count }}/{{
                      formData.training_people
                    }}(人)
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">培训学校</div>
                  <div class="desText">{{ formData.training_school_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">报道地点</div>
                  <div class="desText">{{ formData.training_address }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">报道时间</div>
                  <div class="desText">{{ formData.report_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">培训时长</div>
                  <div class="desText">{{ formData.training_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">考试时间</div>
                  <div class="desText">{{ formData.training_ks_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">开课时间</div>
                  <div class="desText">{{ formData.training_sk_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">创建时间</div>
                  <div class="desText">{{ formData.create_time }}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </outMain>
</template>
<style scoped lang="less"></style>
